package com.example.crm.web.controller;

import com.example.crm.service.IRoleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * @author lenovo
 */
@Controller
@RequestMapping("/right")
public class RightController {
    @Resource
    private IRoleService roleService;

    /**
     * 权限刷新0
     * @return
     */
    @RequestMapping("/reload")
    public String reload() {
        roleService.reloadFilterChainDefinitions();
        //重定向到main页面
        return "redirect:/main";
    }
}